<template>
  <div class="news">
    <div class="title">
      <p>新闻动态</p>
    </div>
    <div class="content">
        <p v-for="(item, index) in news" :key="index">
        {{ index + 1 }}.<a :href="item.url" target="_blank">{{ item.content }}</a>
      </p>
    </div>
  </div>
</template>

<script>
import { getNews } from '@/api/publicSearch';
export default {
    name: 'newsView',
    data(){
        return {
            //新闻内容
            news: [],
        }
    },
    mounted(){
        getNews().then((res)=>{
            this.news = res.data.data;
            console.info(res.data.data);
        })
        
    }
}
</script>

<style lang="scss" scoped>
@import "../css/character.scss";
@import "../css/common.scss";
.news{
  width: 98%;
    .title {
    font-family: #{$about_page_font_family};
    font-size: #{$about_page_font_size}px;
    text-align: left;
    font-size: #{$first_font_size};
    font-weight: #{$first_font_weight};
    margin-top: #{$first_titile_top}px;
    margin-left: #{$first_titile_left}px;
    margin-bottom: #{$first_titile_bottom}px;
    color: rgb(89, 89, 89);
    text-decoration: underline rgb(68, 114, 196) 3px;
  }

  .content {
    text-align: left;
    // 开头间隔
    text-indent: 20px;
    font-size: #{$second_font_size};
    font-weight: #{$second_font_weight};
    margin-top: #{$first_titile_top}px;
    margin-left: #{$second_titile_left}px;
    margin-bottom: #{$second_titile_bottom}px;
    line-height: #{$about_page_prg}px;
    // p{
    //     margin-bottom: 20px;
    // }
    a:link {
        text-decoration: none;
        color: black;
    }    
    a:visited {
        color: black;
    }
    a:hover {
      color: rgba(0, 84, 190, 1);
    }
  }
}

</style>